import Mock from "mockjs"

const data=Mock.mock({
    "city|36":[{
        "title":"@province()",
        "id":"@id",
        "children|5-10":[{
            "name":"@city()",
            "id":"@id"
        }]
    }],
    "list|20-30":[{
        "url":"@image(150x200,@color)",
        "title":"@ctitle",
        "desc":"@cword(10,15)",
        "price|1-999":1
    }]
})
Mock.mock('/api/city','post',()=>{
        return({
            code:200,
            data:data.city
        })
})

Mock.mock('/api/list','post',()=>{
    return({
        code:200,
        data:data.list
    })
})